﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Buyer_BidingSettings : System.Web.UI.Page
{
    #region Event Handlers

    #region Page Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["Option"].ToString() == "0")
            pnlextendbidding.Visible = true;

        if (Request.QueryString["Option"].ToString() == "1")
            pnlendbidding.Visible = true;

        if (Request.QueryString["Option"].ToString() == "2")
            pnlcancelproject.Visible = true;

        if (Request.QueryString["Option"].ToString() == "3")
            pnlrepostjob.Visible = true;
    }

    #endregion

    #region Buttons Click

    protected void bttnextendbidding_Click(object sender, ImageClickEventArgs e)
    {
        // to do send an automated email to the site admin...
        string emailfeedback;
        bool emailsend = ConstructionBidOnline.MailUtils.SendEmail("admin@constructionbidonline.com", "Admin", " Extend Bidding", "Buyer wishes to extend the time to receive bids for the following job. Please go through the details of that job", out emailfeedback);

        feedbackdiv1.Visible = true;
        lblfeedback1.Text = "A request mail is forwarded according to your request";
    }

    protected void bttnendbidding_Click(object sender, ImageClickEventArgs e)
    {
        // to do send an automated email to the site admin...
        string emailfeedback;
        bool emailsend = ConstructionBidOnline.MailUtils.SendEmail("admin@constructionbidonline.com", "Admin", "End Bidding", "Buyer request to end the bidding for this job.Please go through the details of that job", out emailfeedback);

        feedbackdiv2.Visible = true;
        lblfeedback2.Text = "A request mail is forwarded according to your request";

    }
    protected void bttncancelproject_Click(object sender, ImageClickEventArgs e)
    {
        // to do send an automated email to the site admin...
        string emailfeedback;
        bool emailsend = ConstructionBidOnline.MailUtils.SendEmail("admin@constructionbidonline.com", "Admin", "Cancel Project", "Request for canceling the job. Please go through the details of that job", out emailfeedback);

        feedbackdiv3.Visible = true;
        lblfeedback3.Text = "A request mail is forwarded according to your request";

    }
    protected void bttnrepostjob_Click(object sender, ImageClickEventArgs e)
    {
        // to do send an automated email to the site admin...
        string emailfeedback;
        bool emailsend = ConstructionBidOnline.MailUtils.SendEmail("admin@constructionbidonline.com", "Admin", "Reposting Project", "Request for reposting the job. Please go through the details of that job", out emailfeedback);

        feedbackdiv4.Visible = true;
        lblfeedback4.Text = "A request mail is forwarded according to your request";

    }

    #endregion

    #endregion

    
}
